package strategy.main.strategy;

/**
 * 打8折商品促销策略
 */
public class RebateStrategy implements IStrategy {
    private final double rate;

    public RebateStrategy() {
        this.rate = 0.8;
    }

    /**
     * 计算实际价格方法
     *
     * @param consumePrice
     */
    @Override
    public double realPrice(double consumePrice) {
        return consumePrice * rate;
    }
}
